extends CanvasLayer
@onready var pause_panel: Panel = $Control/Panel
@onready var sfx_button: AudioStreamPlayer = $点击音效
@onready var speed_ui: CanvasLayer = $"../数据UI"

func pause():
	sfx_button.play();
	get_tree().paused=true;
	pause_panel.visible=true;
	speed_ui.visible=false;
	pass;
func un_pause():
	sfx_button.play();
	get_tree().paused=false;
	pause_panel.visible=false;
	speed_ui.visible=true;
	pass;
func exit_menu():
	sfx_button.play();
	get_tree().paused=false;
	await get_tree().create_timer(0.5).timeout  # 等待0.56秒
	get_tree().change_scene_to_file("res://场景/主菜单.tscn")

	pass
